home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / tuning / download / xteq / setup.exe / {app} / plugins / XQ Control Panel Hide NT.xpl < prev    next >
Text File  |  2001-04-12  |  3KB  |  107 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Control Panel\System Icons"
  5. "NAME"="Visible System Icons (NT/2000/XP)"
  6. "VERSION"="1.12"
  7. "OSVERSION"="010101"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Display "" applet"
  10. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  11. "DESCRIPTION 2"="Not all of these options will be available on every system.  Availability depends upon the software installed on your system."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"=" "
  16. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  17. "COMMENT 3"="See also: MS KB Q207750"
  18.  
  19.  
  20. '******************************************************************
  21. '***                ONLY CHANGE LINES BELOW                    ****
  22. '******************************************************************
  23.  
  24. aryDesc=Array("Network/Dial up","RAS Control","Server Manager","DOS Console","Ports","License manager","PCMCIA / Tape / SCSI","Devices / Services / Server","UPS","MS DTC")
  25. aryCPLs=Array("ncpa.cpl","rascpl.cpl","srvmgr.cpl","console.cpl","ports.cpl","liccpa.cpl","devapps.cpl","srvmgr.cpl","ups.cpl","dtccfg.cpl") 
  26.  
  27. '******************************************************************
  28. sPath="HKCU\Control Panel\Don't Load\"
  29. sFile="CONTROL.INI"
  30. sFileSec="Don't Load"
  31.  
  32.  
  33.  
  34. SUB Plugin_Initialize
  35.  for i=0 to UBound(aryCPLs)
  36.      Call ReadIt(i+1,aryCPLs(i),aryDesc(i)) 
  37.  next 
  38. END SUB
  39.  
  40. Sub ReadIt(ItemNumber,VAL,Desc)
  41.   Call SetUIElement(ItemNumber,"Show '" & Desc & "' applet")
  42.  
  43.   If GetWinVer=2 or GetWinVer=4 then
  44.      s=RegReadValue(sPath & VAL)
  45.      if IsEmpty(s)=false then
  46.         Call SetUIElementEx(ItemNumber,false)
  47.      else
  48.         Call SetUIElementEx(ItemNumber,true)
  49.      end if
  50.   else
  51.      s=IniReadValue(sFile,sFileSec,VAL)
  52.      if len(s)>0 then
  53.         Call SetUIElementEx(ItemNumber,false)
  54.      else
  55.         Call SetUIElementEx(ItemNumber,true)
  56.      end if   
  57.   end if
  58.      
  59. End Sub
  60.  
  61. 'Called when the Plugin should validate the Data the user has entered
  62. SUB Plugin_CheckData(ElementIndex)
  63. END SUB
  64.  
  65. 'Called when the Plugin should apply the changes
  66. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  67.  for i=0 to UBound(aryCPLs)
  68.      Call WriteIt(i+1,aryCPLs(i)) 
  69.  next 
  70.  
  71.  Call IndicateSettingChange()
  72. END SUB
  73.  
  74. Sub WriteIt(ITM,VAL)
  75.  b=GetUIElementEx(ITM)
  76.  'b=GetUIElement(-1) 'crash
  77.  if b=true then
  78.     'Display it
  79.  
  80.     if GetWinVer=2 or GetWinVer=4 then  
  81.        s=RegReadValue(sPath & VAL)
  82.        if IsEmpty(s)=false then
  83.           Call RegDeleteValue(sPath & VAL)
  84.        end if
  85.     else
  86.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  87.     end if
  88.  
  89.  else
  90.    'Hide it
  91.    
  92.    if GetWinVer=2 or GetWinVer=4 then
  93.       Call RegWriteValue(sPath & VAL,"1",1) 
  94.    else
  95.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  96.    end if
  97.  
  98.  end if   
  99. End Sub
  100.  
  101.  
  102. 'Called when the Plugin is about to be removed from memory
  103. SUB Plugin_Terminate
  104. END SUB
  105.  
  106.  
  107.